<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
       <v-child :msg="msg" :msg2="msg2"></v-child>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>

    /*父向子传值:
        1. 父亲通过儿子的标签属性给儿子传值
        2. 儿子通过一个props的配置来接受来自父亲的数据*/

    Vue.config.productionTip = false;
    var vm = new Vue({
        el:"#app",
        data:{
            msg:"msg from baba",
            msg2:"msg2 from laozi"
        },
        components:{
            "v-child":{
                props:["msg"],
                template:"<span>{{msg}}</span>"
            }
        }
    })



</script>
</html>